<div class="fui-page-group">
<div class="fui-page  fui-page-current">
    <div class="fui-content" style="padding-bottom:2.5rem">
			<div id="carousel-container" ng-class="{'carousel slide':1,'margin-top0':pagedata.pluginset.issearch==1 || pagedata.isa2}" data-role="carousel" data-param-auto="true" ng-if="pagedata.pluginset.hdps">
				<div class="carousel-inner" role="listbox">
					<div ng-repeat="nav in pagedata.pluginset.hdps" ng-class="{'item':1, 'active':$index==0}" >
						<a ng-click="access_json(nav.url)">
							<img ng-src="{{tomedia(nav.picurl) || '../core/resource/images/nopic.jpg'}}" style="display: block; width: 100%; height: 100%;">
						</a>
					</div>
				</div>
				<style>
						.fui-swipe-page .fui-swipe-bullet {width:0.2rem;height:0.2rem;border-radius: 0.2rem;}
						.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;width:0.6rem;border-radius: 0.2rem;}
				</style>
				<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 0.2rem; bottom: 0.2rem; ">
					<div class="fui-swipe-bullet" ng-repeat="nav in pagedata.pluginset.hdps" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
				</div>
			</div>
            <div class="fui-searchbar bar">
				<div class="fui-cellone" style="padding:0.5rem 0;">
							 <div class="fui-cellone-info">
								<div class="search-input" style="height:1.6rem">
									<form action="javascript:return true">
									<i id="searchsub" class="icon icon-sousuo1 bold" ng-click="pagedata.getlist()" style="line-height: 1.7rem;"></i>
									<input type="search" placeholder="请输入商品名称" class="search" ng-model="pagedata.params.keyword" style="height:1.6rem;border: 0;text-align: left; color: #999; font-size:0.6rem;background:#fff;border-radius: 1rem;" />
									</form>
								</div>
							 </div>
							 <div class="fui-cellone-remark noremark">
								<span style="margin-left:0.3rem;font-size: 0.75rem;" ng-click="pagedata.getlist()">搜索</span>
							 </div>
				</div>
            </div>
			<div class="fui-goods-group block border">
				<div ng-repeat="value in pagedata.list" class="fui-goods-item">
					<a href="javascript:;" ng-click="access_json('jy_bargain/detail/main/id='+value.id)" data-nocache="true" class="external">
						<div class="image" style="background-image: url({{tomedia(value.image)}})">

						</div>
					</a>
					<div class="detail">
						<a href="javascript:;" ng-click="access_json('jy_bargain/detail//id='+value.id)" data-nocache="true" class="external">
							<div class="name">{{value.title}}</div>
						</a>
						<div ng-if="value.type==1">
							<div  class="price">
								<span class="text">底价 ￥{{value.end_price}}</span><br>
							</div>
							<div class="price"><s style="font-size: 12px;color: #BBBBBB">原价￥{{value.price}}</s></div>
						</div>
						<div ng-if="value.type==0">
							<div class="price">
								<span class="text">砍多少减多少</span><br>
							</div>
							<div class="price"><span style="font-size: 12px;color: #555555">原价￥{{value.price}}</span></div>
						</div>
					</div>
				</div>
			</div>
			<div class='content-empty' ng-if="pagedata.list.length<1">
				<i class='icon jinyunicon icon-search'></i><br/>暂时没有砍价活动时间内的商品
			</div>
	</div>
<div ng-include="sys_html('_footer')"></div>
</div>
<script type="text/javascript">
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});

scope.loading = true;
scope.tool.get_list('jy_bargain/index/list/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_bargain/index/list/');
}
scope.pagedata.getlist=function(){
	scope.tool.get_list('jy_bargain/index/list/',true);
}
require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
});
</script>